
import axiosInstance from "./axios"

/*const request = axios.create({
    baseURL: "",
    timeout: 5000,
});*/
const request = axiosInstance;
// 登录post请求
export const userLoginApi = (username, password) => {
    return request.post("/user/login",
        //请求体
        {
            name: username,
            password: password
        }
    )
}

// 简化的注册请求
export const userRegisterApi = (username, password) => {
    return request.post("/user/register", {
        username: username,
        password: password
    })
}

export const getUserCollectionApi = (name) => {
    return request.get(`/user/collection/${name}`)
}